package org.stwy.custom;

import javax.servlet.ServletRequest;
import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.stwy.comm.base.BaseRecordsController;

import com.rap.common.exception.ServiceException;
import com.rap.frame.web.ActionResultModel;
import com.rap.frame.web.BaseController;

/*
 * 物业 控制类
 */
/**
*版权信息 (c) RAP 保留所有权利.
*@author Rap.Codegen
*@Team RAP Team
*@Date 2015-4-4 17:05:42
*<p></p>
*
*@参与人：Rap.Codegen
*/

@Controller
@RequestMapping(value = "/custom")
public class CustomController extends BaseRecordsController<CustomEntity> {

	public CustomController() {
		setResourceIdentity("stwy:custom");
	}
	private CustomService getService(){
		return (CustomService)super.baseService;
	}

	@RequestMapping(method = RequestMethod.GET)
	public String view(Model model) {
		super.assertHasViewPermission();
		return "stwy/custom/custom_main";
	}

	@RequestMapping(value = "/select")
	public String select(Model model, String callback) {
		model.addAttribute("callback", callback);
		return "stwy/custom/custom_select";
	}
	@RequestMapping(value = "/hasdeleted")
	public String hasdeleted(Model model) {
		return "stwy/custom/custom_hasdeleted";
	}
}
